package com.alibaba.nacos.config.server.jpa.entity;

import java.time.LocalDateTime;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

import org.springframework.data.annotation.LastModifiedDate;

/**
 * The type of nacos-all.
 *
 * @author 问道于盲
 * @date 2020-03-12
 *
 */
@Entity
@Table(name = "NACOS_APP_CONFIGDATA_RELATION_PUBS", uniqueConstraints = {
    @UniqueConstraint(name = "UK_APP_PUB_CONFIG_DATAGROUP",
        columnNames = {"APP_NAME", "DATA_ID", "GROUP_ID"})
})
public class AppConfigdataRelationPubsEntity extends AbstractEntity{

    @Column(name = "APP_NAME")
    private String appName;

    @Column(name = "DATA_ID")
    private String dataId;

    @Column(name = "GROUP_ID")
    private String groupId;

    @Column(name = "gmt_modified")
    @LastModifiedDate
    private LocalDateTime gmtModified;

    /**
     * get appName
     *
     * @return appName
     */
    public String getAppName() {
        return appName;
    }

    /**
     * set appName
     *
     * @param appName appName
     */
    public void setAppName(String appName) {
        this.appName = appName;
    }

    /**
     * get dataId
     *
     * @return dataId
     */
    public String getDataId() {
        return dataId;
    }

    /**
     * set dataId
     *
     * @param dataId dataId
     */
    public void setDataId(String dataId) {
        this.dataId = dataId;
    }

    /**
     * get groupId
     *
     * @return groupId
     */
    public String getGroupId() {
        return groupId;
    }

    /**
     * set groupId
     *
     * @param groupId groupId
     */
    public void setGroupId(String groupId) {
        this.groupId = groupId;
    }

    /**
     * get gmtModified
     *
     * @return gmtModified
     */
    public LocalDateTime getGmtModified() {
        return gmtModified;
    }

    /**
     * set gmtModified
     *
     * @param gmtModified gmtModified
     */
    public void setGmtModified(LocalDateTime gmtModified) {
        this.gmtModified = gmtModified;
    }

}
